<%- include('../includes/header') %>
    <link rel="stylesheet" href="/css/forms.css">
</head>
<body>
    <%- include('../includes/navigation') %>
    <main>
        <form class="product-form" action="/admin/edit-product" method="post">
            <div class="form-control">
                <label for="title">商品名称：</label>
                <input id="title" type="text" name="title" value="<%= product.title %>">
            </div>
            <div class="form-control">
                <label for="imageUrl">商品图片：</label>
                <input id="imageUrl" type="text" name="imageUrl" value="<%= product.imageUrl %>">
            </div>
            <div class="form-control">
                <label for="price">商品价格：</label>
                <input id="price" type="number" step="0.01" name="price" value="<%= product.price %>">
            </div>
            <div class="form-control">
                <label for="description">商品描述：</label>
                <textarea name="description" id="description" rows="5"><%= product.description %></textarea>
            </div>
            <input type="hidden" name="id" value="<%= product._id %>">
            <div class="form-action">
                <button type="submit">保存</button>
            </div>
        </form>
    </main>
<%- include('../includes/end') %>